<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDomainsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('domains', function (Blueprint $table) {
            $table->increments('id');
            $table->string('domain')->index()->default('');
            $table->tinyInteger('type')->comment('域名类型：1 落地域名，2 支付落地域名，3 防封入口域名');
            $table->tinyInteger('state')->default('1')->comment('状态：1 正常，0 停用，-1 封禁');
            $table->string('mark')->nullable()->default('');
            $table->integer('sort')->default(0)->comment('排序');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('domains');
    }
}
